
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <BXmlNode>
#include <BIcon>
#include <BReadWrite>
#include <BTexture>
#include <BImage>
#include <BLabel>
#include <BFileDialog>
#include <BStyle>
#include <BGridLayout>
#include <BHBoxLayout>
#include <BVBoxLayout>
#include <BButton>
#include <BComboBox>
#include <BSpinBox>
#include <BTreeWidget>
#include <BScrollWidget>
#include <BTableWidget>
#include <BMenu>
#include <BSlider>
#include <BCheckBox>
#include <BMainWindow>

#include "PropertyBoard.h"
#include "PixmapArea.h"

class MainWindow : public BMainWindow
{
public:
	MainWindow();

protected:
	void insertWidget(BWidget* widget);
	void insertLayout(BLayout* layout);

	BXmlNode* writeXmlNode(BWidget* widget);
	BWidget* readXmlNode(BXmlNode* node);

protected:
	void slotOpenActionTrigger(BObject* object, const BValue& value);
	void slotSaveActionTrigger(BObject* object, const BValue& value);
	void slotResetActionTrigger(BObject* object, const BValue& value);
	void slotInsertWidgetMenuTrigger(BObject* object, const BValue& value);
	void slotInsertLayoutMenuTrigger(BObject* object, const BValue& value);
	void slotEventEnabledChecked();

	void slotTreeItemSelected(BObject* object, const BValue& value);
	void slotObjectSelected(BObject* object, const BValue& value);
	void slotObjectUnselected(BObject* object, const BValue& value);
	void slotObjectOrderAdjusted(BObject* object, const BValue& value);

	void slotWidgetFramed(BObject* object, const BValue& value);

protected:
	virtual void updateEvent(const BEvent& event);

private:
	BMenu*			_widgetMenu;
	BMenu*			_layoutMenu;
	BCheckBox*		_eventEnabledCheckBox;

	BTreeWidget*	_treeWidget;
	PixmapArea*		_pixmapArea;
	BSpacer*		_pixmapSpacer;
	PropertyBoard*	_propertyBoard;

	BComboBox*		_imageSizeComboBox;

};

#endif